package com.xy.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created by XiuYang on 2016/11/18.
 */
public interface FastDFSService {
    /**
     * 上传MultipartFile
     * @param file
     * @return
     */
    String upload(MultipartFile file) throws IOException;
    /**
     * 上传一般文件
     * @param file
     * @return
     */
    String upload(File file) throws IOException;

    String upload(InputStream inputStream,long fileSize, String fileExtName) throws IOException;

    /**
     * 上传从文件
     *
     * @param prefixName
     * @param fileExtName
     * @return
     */
    String uploadSlaveFile(String masterFilePath, File slaveFile, String prefixName, String fileExtName) throws IOException;
}
